package com.hnichr.ump.common.assessment.entity;

import com.hnichr.ump.common.entity.UmpEntity;
import com.mxpioframework.jpa.annotation.Generator;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "t_assessment_question")
@Schema(description = "测评活动本地试卷题目表")
public class Question extends UmpEntity {
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id;

    @Column(name = "PAPER_ID_")
    @Schema(description = "试卷ID")
    private String paperId ;

    @Column(name = "QUESTION_NAME_")
    @Schema(description = "题目")
    private String questionName ;

    @Column(name = "QUESTION_TYPE_")
    @Schema(description = "题目类型  1-单选   2-多选   3-问答")
    private String questionType;

    @Column(name = "DEL_FLAG_")
    @Schema(description = "删除标志")
    private String delFlag= "0";

    @Column(name = "ORDER_NUM_")
    @Schema(description = "排序字段")
    private Integer orderNum;

    public enum TYPE{
        SINGLE_SELECT("1"),MULTI_SELECT("2"),ANSWER("3");
        private String code;

        TYPE(String code){
            this.code = code;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }
    }
}
